import 'package:flutter/material.dart';

void main() => runApp(myapp());

class myapp extends StatelessWidget{
  @override
  Widget build(BuildContext context){
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Container(
            child:new Text('你好，大飞',style: TextStyle(fontSize: 50.0),),
            alignment: Alignment.topLeft, //对齐方式 center centerLeft  top topLeft  bottom  bottomLeft
            width: 500.0, //宽
            height: 500.0, //高
            // color:Colors.yellow, //背景颜色, 设置decoration属性，就要把这个注释，两者选其一
            padding: const EdgeInsets.fromLTRB(20.0,30.0,0.0,0.0), //EdgeInsets.all(20.0) 左 上 右 下  EdgeInsets.fromLTRB 分开设置
            margin: const EdgeInsets.all(30.9), //分开设置如此  fromLTRB
            decoration: new BoxDecoration(
              gradient: const LinearGradient(
                colors: [Colors.lightBlue,Colors.greenAccent,Colors.purple]
              ),
              border: Border.all(width: 2.0, color: Colors.red)
            ),
          ),
        ),
      ),
    );
  }
}